package com.yoo.module_base.view.index.slideview

import android.view.animation.DecelerateInterpolator
import android.view.animation.Interpolator
import com.yoo.module_base.view.index.slideview.hp.IndexSlideCardAnimaSetting

class IndexSlideCardRewindAnimaSetting private constructor(
    override val direction: IndexSlideCardDirection,
    override val duration: Int,
    override val interpolator: Interpolator
) : IndexSlideCardAnimaSetting {

    class Builder {
        private var direction = IndexSlideCardDirection.Bottom
        private var duration = IndexSlideCardDuration.Normal.duration
        private var interpolator: Interpolator = DecelerateInterpolator()
        fun setDirection(direction: IndexSlideCardDirection): Builder {
            this.direction = direction
            return this
        }

        fun setDuration(duration: Int): Builder {
            this.duration = duration
            return this
        }

        fun setInterpolator(interpolator: Interpolator): Builder {
            this.interpolator = interpolator
            return this
        }

        fun build(): IndexSlideCardRewindAnimaSetting {
            return IndexSlideCardRewindAnimaSetting(
                direction,
                duration,
                interpolator
            )
        }
    }
}
